package hellfire.platform.graphics;

import java.util.Vector;

import hellfire.game.Chicken;
import hellfire.game.ChickenDebris;
import hellfire.game.Game;
import hellfire.game.weapons.AbstractWeapon;
import hellfire.system.R;
import hellfire.system.graphics.GLImage;
import hellfire.system.graphics.GLRelVec2;
import hellfire.system.graphics.GLVec2;

public class GameRenderer 
{
	private Game game;
	private GLImage background;
	
	public GameRenderer(Game game)
	{
		this.game = game;
		background = new GLImage(R.drawable.sheet, new GLVec2(0,0), new GLRelVec2(1.3,1));
	}
	
	
	public void draw(float[] matrix)
	{
		background.draw(matrix);
		for(ChickenDebris deb : game.getChickenDebris())
		{
			deb.getRenderer().draw(matrix, deb);
		}
		
		for(Chicken c : game.getChickens())
			c.getRenderer().draw(matrix, c);
		
		for(AbstractWeapon w : game.getWeapons())
		{
			w.getRenderer().draw(matrix, w);
		}
		
	}
}
